package com.example.demo.zabbix.request.builder.host;

import com.example.demo.zabbix.request.BaseRequest;
import com.example.demo.zabbix.request.builder.request.CreateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/hostgroup/create
 */
public class HostGroupCreateRequestBuilder extends CreateRequestBuilder {
    private String name;
    public HostGroupCreateRequestBuilder(String auth) {
        super("hostgroup.create", auth);
    }

    public HostGroupCreateRequestBuilder(Long id, String auth) {
        super("hostgroup.create", id, auth);
    }

    public String getName() {
        return name;
    }

    public HostGroupCreateRequestBuilder setName(String name) {
        this.name = name;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("name",name);
        return baseRequest;
    }
}
